package com.incar.chuxing.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import com.incar.chuxing.utils.Logger;

public class MyCheckBox extends android.support.v7.widget.AppCompatCheckBox {

    private boolean isClicked = false;

    public boolean isClicked() {
        return isClicked;
    }

    public void setDefault() {
        isClicked = false;
        setChecked(false);
    }


    @Override
    public boolean onTouchEvent(MotionEvent event) {
        Logger.d("checkClick", this.toString()+"ccdcdd");
        isClicked = true;
        return super.onTouchEvent(event);
    }


    public MyCheckBox(Context context) {
        super(context);
    }

    public MyCheckBox(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyCheckBox(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }
}
